<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <!--<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">-->
    <title>工作内容</title>

    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" type="text/css" media="all" th:href="@{/css/tyle.css}">
    <style type="text/css">
        body {
            background-color: #ffffff;
        }
        #font {
            font-size: 16px;
            color: #666;
            margin-top: 10px;
            margin-bottom: 15px;
        }

        #title {
            padding: 15px;
            font-size: 30px;
        }

        .layui-nav {
            padding-left: 10%;
            padding-right: 10%;
        }

        #content {
            margin-left: 20px;
        }

        hr {
            margin-bottom: 20px;
        }
    </style>
</head>
<body><!-- ctrl + F9  -->

<ul class="layui-nav layui-bg-black">
    <img th:src="@{/images/logo.png}" style="margin-right: 30px">
    <li class="layui-nav-item"><a href="/">网站首页</a></li>
    <li class="layui-nav-item" style="float: right;">
        <div th:if="${ session.uid != null}">
            <a><img th:src="'/user/img/'+${session.uid}" class="layui-nav-img">我</a>
            <dl class="layui-nav-child">
                <dd><a th:href="'/user/user?id='+ ${session.uid}">个人中心</a></dd>
                <dd><a href="/user/upPass">修改密码</a></dd>
                <dd><a th:href="@{/user/exit}">退出</a></dd>
            </dl>
        </div>
        <div th:if="${session.uid == null}">
            <button class="layui-btn layui-btn-radius layui-btn-sm" onclick="window.location.href='/user/login'">登录</button>
            <button class="layui-btn layui-btn-radius layui-btn-sm" onclick="window.location.href='/user/signIn'">注册
            </button>
        </div>
    </li>
</ul>
<br>
<fieldset class="layui-elem-field" style="border-color: #ffffff;margin-left: 10%;margin-right: 10%">
    <h3 th:if="${job == null}" style="font-size: 18px">您查看的工作不存在</h3>
    <div class="layui-field-box" th:if="${job != null}" th:object="${job}">
        <br>
        <br>
        <br>
        <a th:href="'/user/user?id='+ *{uid}">
            <img th:src="'/user/img/'+ *{uid}" class="layui-circle"
             style="width: 50px; float: right;">
        </a>
        <span class="layui-badge layui-bg-green" id="title" th:text="*{jobName}">Java工程师</span>&nbsp;
        <span class="layui-badge" th:text="*{orUse == 1} ? '正在招聘':'招聘已关闭'"></span>
        <br>
        <br>
        <div id="content">
            <div class="layui-row">
                <div class="layui-col-xs12" id="font" th:text="*{jobDate}">发布时间：2016-1-2</div>
            </div>
            <div class="layui-row" style="margin-right: 30%">
                <div class="layui-col-xs2" id="font" th:text="*{jobMoney}+'/天'">110-120/天</div>
                <div class="layui-col-xs2" id="font" th:text="*{jobPosition}">杭州</div>
                <div class="layui-col-xs2" id="font" th:text="*{jobAcademic}">本科</div>
                <div class="layui-col-xs2" id="font" th:text="*{jobWeekDay}+'天/周' ">4天/周</div>
                <div class="layui-col-xs2" id="font" th:text="*{jobWorkTime}">实习5个月</div>
                <div class="layui-col-xs2" id="font" th:text="*{jobReMark}">可转正</div>
            </div>
            <div class="layui-row">
                <div class="layui-col-xs12" id="font" th:utext="*{jobGood}">职位诱惑：阿里系创业公司，团队氛围好，能快速学习</div>
            </div>
        </div>
        <hr>
        <div id="content">
            <div class="layui-row">
                <div class="layui-col-xs12" id="font" th:utext="*{jobDetail}">
                    职位描述：
                    岗位要求：
                    1、自己是计算机、软件工程、电子信息等相关专业的在校学生；
                    2、有基本的编程基础，对主流的编程语言及框架能熟练运用；
                    3、每周至少有3天时间来公司参与工作，全职是最为理想的；

                    工作职责：
                    1、负责系统代码的编写及单元测试；
                    2、bug修复
                    3、参与系统架构设计

                    提供实习证明及转正机会；
                </div>
            </div>
        </div>
        <hr>
        <div id="content">
            <div class="layui-row">
                <div class="layui-col-xs6" id="font">
                    <span style="font-size: 22px">发布者简介</span>
                </div>
                <div class="layui-col-xs6" id="font" th:text="*{jobComClass}">个人</div>
            </div>
            <div class="layui-row">
                <div class="layui-col-xs12" id="font" th:text="*{jobComName}">个人工作室</div>
            </div>
            <div class="layui-row">
                <div class="layui-col-xs12" id="font" th:utext="*{jobComDetail}">工作室描述</div>
            </div>
        </div>
        <hr>

        <div id="content">
            <div class="layui-row">
                <div class="layui-col-xs12" id="font">
                    <span style="font-size: 20px">截止时间</span>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-xs12" id="font" th:text="*{jobDeadline}">2016-03-022</div>
            </div>
        </div>
        <br>
        <div style="width: 100%;text-align: center;">
            <button class="layui-btn layui-btn-lg tou" style="font-size: 22px" th:id="*{id}">&nbsp;投个简历&nbsp;</button>
        </div>
        <br>
        <hr>
    </div>
</fieldset>

<script th:src="@{/layui/layui.all.js}"></script>
<script src="http://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
<script>
    //由于模块都一次性加载，因此不用执行 layui.use() 来加载对应模块，直接使用即可：
    ;!function () {
        var pid = $(".tou").attr("id");
        $(".tou").on('click', function () {
            console.info(pid);
            $.ajax({
                url: "/job/result",
                type: "post",
                data: {id: pid},
                success: function (result) {
                    layer.alert(result);
                }
            });
        });
        // layer.msg('Hello World');
    }();
</script>
</body>
</html>
